<!DOCTYPE html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>为Visual Studio code增加markdown自定义代码提示 &#8211; 西去无狗</title>
<meta name="description" content="">

    

<meta name="keywords" content="dev">



<meta name="twitter:title" content="为Visual Studio code增加markdown自定义代码提示">
<meta name="twitter:description" content="众鸟高飞尽，孤云独去闲；相看两不厌，只有敬亭山。">


    
    
        <meta name="twitter:card" content="summary_large_image">
        <meta name="twitter:image" content="http://dev.fengaili.com/images/abstract-11.jpg">
    



<meta property="og:type" content="article">
<meta property="og:title" content="为Visual Studio code增加markdown自定义代码提示">
<meta property="og:description" content="众鸟高飞尽，孤云独去闲；相看两不厌，只有敬亭山。">
<meta property="og:url" content="http://dev.fengaili.com/dev/visual_studio_code_-snnipet/">
<meta property="og:site_name" content="西去无狗">


    
    <meta property="og:image" content="http://dev.fengaili.com/images/abstract-11.jpg" />


  <meta property="og:updated_time" content="2018-05-08T00:00:00&#43;00:00"/>






<link rel="canonical" href="http://dev.fengaili.com/dev/visual_studio_code_-snnipet/">


<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">


<link rel="stylesheet" href="/css/main.css">

<link href="//fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic" rel="stylesheet" type="text/css">

<meta http-equiv="cleartype" content="on">

<meta name="generator" content="Hugo 0.40.2" />

<script src="/js/vendor/modernizr-2.6.2.custom.min.js"></script>


<link rel="shortcut icon" href="/favicon.png">


</head>

<body id="post" class="feature">
<nav id="dl-menu" class="dl-menuwrapper" role="navigation" style="display:inline-block">
	<button class="dl-trigger">Open Menu</button>
	<ul class="dl-menu">
		<li><a href="/">Home</a></li>
		
	
		
	    <li><a href="/blog/" >生活笔记</a></li>
	  
	    <li><a href="/tags/" >tags</a></li>
	  
	    <li><a href="/posts/" >posts</a></li>
	  
	</ul>
</nav>

 
<div class="entry-header">

	
    <div class="entry-image">
      <img src="/images/abstract-11.jpg" alt="为Visual Studio code增加markdown自定义代码提示">
    </div>
</div>
  

<div id="main" role="main">
  <article class="hentry">
    <header class="header-title">
      <div class="header-title-wrap">
        
          <h1 class="entry-title"><a href="/dev/visual_studio_code_-snnipet/" rel="bookmark" title="为Visual Studio code增加markdown自定义代码提示">为Visual Studio code增加markdown自定义代码提示</a></h1>
        
         
        <h2><span class="entry-date date published"><time datetime="2018-05-08 00:00:00 &#43;0000 UTC">May 8, 2018</time></span></h2>
        
      <p class="entry-reading-time">
        <i class="fa fa-clock-o"></i>
        Reading time ~2 minutes
    </p>
      </div>
    </header>
    <div class="entry-content">
      

<blockquote>
<p>为Visual Studio code增加markdown 自定义代码提示</p>
</blockquote>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-php" data-lang="php">文件-&gt;首选项-&gt;用户代码片段
编辑 markdown.json
文件-&gt;首选项-&gt;设置-&gt; 增加 &#34;editor.tabCompletion&#34;: true</code></pre></div>
<p><a href="https://code.visualstudio.com/docs/editor/userdefinedsnippets">参考资料</a></p>

<h2 id="代码片段">代码片段</h2>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-js" data-lang="js">{
	<span style="color:#e6db74">&#34;img&#34;</span><span style="color:#f92672">:</span>{
		<span style="color:#e6db74">&#34;prefix&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;img&#34;</span>,
		<span style="color:#e6db74">&#34;body&#34;</span><span style="color:#f92672">:</span> [<span style="color:#e6db74">&#34;![${1:Image Title}](${2:Image Source}) ${0}&#34;</span>],
		<span style="color:#e6db74">&#34;description&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;img&#34;</span>
	},

	<span style="color:#e6db74">&#34;code&#34;</span><span style="color:#f92672">:</span>{
		<span style="color:#e6db74">&#34;prefix&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;code&#34;</span>,
		<span style="color:#e6db74">&#34;body&#34;</span><span style="color:#f92672">:</span> [<span style="color:#e6db74">&#34;`${1:Inline Code Snippet}` ${0}&#34;</span>],
		<span style="color:#e6db74">&#34;description&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;code&#34;</span>
	},
	<span style="color:#e6db74">&#34;hr&#34;</span><span style="color:#f92672">:</span>{
		<span style="color:#e6db74">&#34;prefix&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;hr&#34;</span>,
		<span style="color:#e6db74">&#34;body&#34;</span><span style="color:#f92672">:</span> [
			<span style="color:#e6db74">&#34;---&#34;</span>,
			<span style="color:#e6db74">&#34;${0}&#34;</span>
		],
		<span style="color:#e6db74">&#34;description&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;hr&#34;</span>
	},
	<span style="color:#e6db74">&#34;ol&#34;</span><span style="color:#f92672">:</span>{
		<span style="color:#e6db74">&#34;prefix&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;ol&#34;</span>,
		<span style="color:#e6db74">&#34;body&#34;</span><span style="color:#f92672">:</span> [
			<span style="color:#e6db74">&#34;1. ${1:First Item}&#34;</span>,
			<span style="color:#e6db74">&#34;2. ${2:Second Item}&#34;</span>,
			<span style="color:#e6db74">&#34;3. ${3:Third Item}&#34;</span>,
			<span style="color:#e6db74">&#34;${0}&#34;</span>
		],
		<span style="color:#e6db74">&#34;description&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;ol&#34;</span>
	},
	<span style="color:#e6db74">&#34;pre&#34;</span><span style="color:#f92672">:</span>{
		<span style="color:#e6db74">&#34;prefix&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;pre&#34;</span>,
		<span style="color:#e6db74">&#34;body&#34;</span><span style="color:#f92672">:</span> [
			<span style="color:#e6db74">&#34;```${1:language}&#34;</span>,
			<span style="color:#e6db74">&#34;${2:Multi-line Code}&#34;</span>,
			<span style="color:#e6db74">&#34;```&#34;</span>,
			<span style="color:#e6db74">&#34;${0}&#34;</span>
		],
		<span style="color:#e6db74">&#34;description&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;pre&#34;</span>
	},
	<span style="color:#e6db74">&#34;strike&#34;</span><span style="color:#f92672">:</span>{
		<span style="color:#e6db74">&#34;prefix&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;strike&#34;</span>,
		<span style="color:#e6db74">&#34;body&#34;</span><span style="color:#f92672">:</span> [
			<span style="color:#e6db74">&#34;~~${1:Strike Through}~~ ${0}&#34;</span>
		],
		<span style="color:#e6db74">&#34;description&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;strike&#34;</span>
	},
	<span style="color:#e6db74">&#34;table&#34;</span><span style="color:#f92672">:</span>{
		<span style="color:#e6db74">&#34;prefix&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;table&#34;</span>,
		<span style="color:#e6db74">&#34;body&#34;</span><span style="color:#f92672">:</span> [
			<span style="color:#e6db74">&#34;| ${1:Column 1} | ${2:Column 2} |&#34;</span>,
			<span style="color:#e6db74">&#34;| ------------- | ------------- |&#34;</span>,
			<span style="color:#e6db74">&#34;| ${3:Cell 1-1} | ${4:Cell 1-2} |&#34;</span>,
			<span style="color:#e6db74">&#34;| ${5:Cell 2-1} | ${6:Cell 2-2} |&#34;</span>,
			<span style="color:#e6db74">&#34;${0}&#34;</span>
		],
		<span style="color:#e6db74">&#34;description&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;table&#34;</span>
	},
	<span style="color:#e6db74">&#34;ul&#34;</span><span style="color:#f92672">:</span>{
		<span style="color:#e6db74">&#34;prefix&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;ul&#34;</span>,
		<span style="color:#e6db74">&#34;body&#34;</span><span style="color:#f92672">:</span> [
			<span style="color:#e6db74">&#34;- ${1:I} &#34;</span>,
			<span style="color:#e6db74">&#34;- ${2:Love}&#34;</span>,
			<span style="color:#e6db74">&#34;- ${3:Markdown}&#34;</span>,
			<span style="color:#e6db74">&#34;${0}&#34;</span>
		],
		<span style="color:#e6db74">&#34;description&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;ul&#34;</span>
	},
	<span style="color:#e6db74">&#34;bq&#34;</span><span style="color:#f92672">:</span>{
		<span style="color:#e6db74">&#34;prefix&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;bq&#34;</span>,
		<span style="color:#e6db74">&#34;body&#34;</span><span style="color:#f92672">:</span> [
			<span style="color:#e6db74">&#34;&gt; ${1:Put a nice, beautiful}&#34;</span>,
            <span style="color:#e6db74">&#34;&gt; ${2:quote here...}&#34;</span>,
            <span style="color:#e6db74">&#34;${0}&#34;</span>
		],
		<span style="color:#e6db74">&#34;description&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;bq&#34;</span>
	},
	<span style="color:#e6db74">&#34;a&#34;</span><span style="color:#f92672">:</span>{
		<span style="color:#e6db74">&#34;prefix&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;a&#34;</span>,
		<span style="color:#e6db74">&#34;body&#34;</span><span style="color:#f92672">:</span> [
			<span style="color:#e6db74">&#34;[${1:Link Title}](${2:Link Source}) ${0}&#34;</span>
		],
		<span style="color:#e6db74">&#34;description&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;a&#34;</span>
	},

	<span style="color:#e6db74">&#34;h1&#34;</span><span style="color:#f92672">:</span>{
		<span style="color:#e6db74">&#34;prefix&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;h1&#34;</span>,
		<span style="color:#e6db74">&#34;body&#34;</span><span style="color:#f92672">:</span> [
			<span style="color:#e6db74">&#34;# ${1:Heading 1}&#34;</span>,
			<span style="color:#e6db74">&#34;${0}&#34;</span>
		],
		<span style="color:#e6db74">&#34;description&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;h1&#34;</span>
	},
	<span style="color:#e6db74">&#34;h2&#34;</span><span style="color:#f92672">:</span>{
		<span style="color:#e6db74">&#34;prefix&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;h2&#34;</span>,
		<span style="color:#e6db74">&#34;body&#34;</span><span style="color:#f92672">:</span> [
			<span style="color:#e6db74">&#34;## ${2:Heading 2}&#34;</span>,
			<span style="color:#e6db74">&#34;${0}&#34;</span>
		],
		<span style="color:#e6db74">&#34;description&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;h2&#34;</span>
	},
	<span style="color:#e6db74">&#34;h3&#34;</span><span style="color:#f92672">:</span>{
		<span style="color:#e6db74">&#34;prefix&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;h3&#34;</span>,
		<span style="color:#e6db74">&#34;body&#34;</span><span style="color:#f92672">:</span> [
			<span style="color:#e6db74">&#34;### ${3:Heading 3}&#34;</span>,
			<span style="color:#e6db74">&#34;${0}&#34;</span>
		],
		<span style="color:#e6db74">&#34;description&#34;</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;h3&#34;</span>
	}
}
</code></pre></div>
      <footer class="entry-meta">
          
        <span class="entry-tags"><a href="/tags/#dev" title="Pages tagged dev" class="tag"><span class="term">dev</span></a></span>
        
        
        <div class="social-share">
  <ul class="socialcount socialcount-small inline-list">
    <li class="facebook"><a href="https://www.facebook.com/sharer/sharer.php?u=http%3a%2f%2fdev.fengaili.com%2fdev%2fvisual_studio_code_-snnipet%2f" target="_blank" title="Share on Facebook"><span class="count"><i class="fa fa-facebook-square"></i> Like</span></a></li>
    <li class="twitter"><a href="https://twitter.com/intent/tweet?text=http%3a%2f%2fdev.fengaili.com%2fdev%2fvisual_studio_code_-snnipet%2f" target="_blank" title="Share on Twitter"><span class="count"><i class="fa fa-twitter-square"></i> Tweet</span></a></li>
    <li class="googleplus"><a href="https://plus.google.com/share?url=http%3a%2f%2fdev.fengaili.com%2fdev%2fvisual_studio_code_-snnipet%2f" target="_blank" title="Share on Google Plus"><span class="count"><i class="fa fa-google-plus-square"></i> +1</span></a></li>
  </ul>
</div>

      </footer>
    </div>
    
    <section id="disqus_thread"><div id="disqus_thread"></div>
<script type="text/javascript">

(function() {
    
    
    if (window.location.hostname == "localhost")
        return;

    var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
    var disqus_shortname = 'xiquwugou';
    dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</section>
    
  </article>
</div>

<div class="footer-wrapper">
  <footer role="contentinfo">
    <span> Powered by <a href="https://gohugo.io/" rel="nofollow">Hugo</a> using the <a href="https://github.com/dldx/hpstr-hugo-theme" rel="nofollow">HPSTR</a> theme.</span>

  </footer>
</div>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="\/js\/vendor\/jquery-1.9.1.min.js"><\/script>')</script>
<script src="/js/scripts.min.js"></script>



</body>
</html>

